/*******************************************************************************
 * Copyright (c) 2018, 2018 GuoGuang Corporation and others.
 * All rights reserved. 
 *  
 * Create By Time 2018-2018年3月20日-上午9:11:35
 * Contributors:
 *     longshiyu
 * @longsy316@163.com
 *******************************************************************************/

package com.lsy.onehot.rnn.response;

import java.io.IOException;

import com.gg.lsy.ai.utils.response.AbstractQADataSet;
import com.lsy.lstm.ai.rnn.qa.QADeeplearningCore;
import com.lsy.onehot.rnn.main.DeeplearingOneHotCore;

/**
 * @author Administrator
 * @time 2018 - 2018年3月20日 - 上午9:11:35
 * @desc DeeplearningData.java
 */
public class DeeplearningOneShotData extends AbstractQADataSet {
	/**
	 * 
	 */
	private DeeplearingOneHotCore dlcore ;
	public DeeplearningOneShotData() {
		// TODO Auto-generated constructor stub
	}

	/** (non-Javadoc)
	 * @see com.gg.lsy.ai.app.IResponse#response(java.lang.String)
	 * @author longsy
	 * @time : 2018 2018年3月20日 上午9:13:22
	 * @desc DeeplearningData.java
	 * @param input
	 * @return
	 * response $
	 * (功能描述)
	 */
	public String response(String input) {
		// TODO Auto-generated method stub
		return dlcore.getAnswer(input);
	}

	@Override
	public void init()    {
		// TODO Auto-generated method stub
		 try {
			 dlcore = new DeeplearingOneHotCore() ;
			 dlcore.setLoad(true);
			 dlcore.run();
		} catch (Exception e) {
			// TODO Auto-generated catch block
		}
	}

}
